import VueRouter from "vue-router";
import Vue from 'vue'
const home = () => import('../views/home.vue')
const gx = () => import('../components/home/gx.vue')
const gs = () => import('../components/home/gs.vue')
const zs = () => import('../components/home/zs.vue')
const gd = () => import('../components/home/gd.vue')
const zx = () => import('../components/home/zx.vue')
const phb = () => import('../components/home/phb.vue')
const zx01 = () => import('../components/home/zx01.vue')
const zx02 = () => import('../components/home/zx02.vue')
const gdPage = () => import('../views/gdPage.vue')
const songlist = () => import('../components/gdPage/songlist.vue')
const comment = () => import('../components/gdPage/comment.vue')
const collector = () => import('../components/gdPage/collector.vue')
const artistInfo = () => import('../views/artistInfo.vue')
const info=()=>import('../components/artistInfo/info.vue')
const mv=()=>import('../components/artistInfo/MV.vue')
const simi=()=>import('../components/artistInfo/simi.vue')
const zhuanji = () => import('../components/artistInfo/zhuanji.vue')
const search = () => import('../views/search.vue')
const song = () => import('../components/search/song.vue')
const artist = () => import('../components/search/artist.vue')
const video = () => import('../components/search/video.vue')
const playVideo = () => import('../views/playVideo.vue')
const PlaySong = () => import('../views/playSong.vue')
const gds=()=>import('../components/search/gds.vue')
Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        redirect: '/home/gx'
    }, {
        path: '/home',
        component: home,
        children: [
            { path: 'gx', component: gx },
            { path: 'gs', component: gs },
            { path: 'gd', component: gd },
            { path: 'zx', component: zx, redirect: '/home/zx/xgsd', children: [{ path: 'xgsd', component: zx01 }, { path: 'xdsj', component: zx02 }] },
            { path: 'zs', component: zs },
            { path: 'phb', component: phb },
            {
                path: 'gdPage',
                component: gdPage,
                children: [
                    {
                        path: 'songlist',
                        name:'songlist',
                        component: songlist
                    }, {
                        path: 'comment',
                        name:'comment',
                        component: comment
                    }, {
                        path: 'collector',
                        name:'collector',
                        component: collector
                    }
                ]
            }, {
                path: 'artistInfo',
                name:'artistInfo',
                component: artistInfo,
                children: [
                    {
                        path: 'info',
                        name:'info',
                        component:info
                    }, {
                        path: 'mv',
                        name:'mv',
                        component:mv
                    }, {
                        path: 'simi',
                        name:'simi',
                        component:simi
                    }, {
                        path: 'zhuanji',
                        name:'zhuanji',
                        component:zhuanji
                    },
                ]
            }, {
                path: 'search',
                name: 'search',
                component: search,
                children: [
                    {
                        path: 'song',
                        name: 'song',
                        component:song
                    }, {
                        path: 'artist',
                        name: "artist",
                        component:artist
                    }, {
                        path: 'video',
                        name: 'video',
                        component:video
                    }, {
                        path: 'gds',
                        name: 'gds',
                        component:gds
                    }
                ]
            }, {
                path: 'playVideo',
                name: 'playVideo',
                component:playVideo
            }, {
                path: 'playSong',
                name: 'playSong',
                component:PlaySong
            }
        ]
    }
]

export default new VueRouter({
    routes: routes,
    mode: 'history'
})